<template>
  <div class="institute-box">
    <div class="title">
      挚物研究院
      <div class="more-btn" @click="toPage">更多</div>
    </div>
    <div class="topic-selection-box">
      <TopicSelectionItem v-for="(item, index) of xtList.slice(0, 3)" :key="index" :data="item" />
    </div>
  </div>
</template>

<script>
import TopicSelectionItem from '@/views/home/components/TopicSelectionItem';
import { sideModuleRecommends } from '@/api/api';

export default {
  components: {
   TopicSelectionItem 
  },
  props: ['xtList'],
  data() {
    return {
      list: []
    }
  },
  created() {
    // this.getList();
  },
  methods: {
    async getList() {
      const params = {
        moduleId: 5,
        status: 1
      };
      const res = await sideModuleRecommends(params);
      this.list = res.list || [];
    },
    toPage() {
      let routerJump = this.$router.resolve({ name: 'Institute' });
      window.open(routerJump.href, '_blank');
    }
  }
}
</script>

<style lang="scss" scoped>
.institute-box {
  margin-bottom: 24px;
  .title {
    height: 32px;
    font-size: 24px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #272727;
    line-height: 32px;
    margin-bottom: 24px;
    .more-btn {
      height: 18px;
      font-size: 14px;
      
      font-weight: 400;
      color: #696969;
      line-height: 18px;
      float: right;
      margin-top: 7px;
      cursor: pointer;
    }
  }
  .topic-selection-box {
    background: #ffffff;
    padding: 4px 20px 0;
  }
}
</style>